<?php
class lanmuControl extends Control{
	public function index(){
		$catid=$_GET['catid'];
		$liebiao=M('category');
		$dd=$liebiao->where("catid=$catid")->all();
		$this->assign('dd',$dd);
		$db=k('newsrelation');
		$dba=$db->count("catid=$catid");
		$page=new page($dba,6);
		$data=$db->where("catid=$catid")->limit($page->limit())->all();
		foreach($data as $key=>$value){
			$data[$key]["body"] = strip_tags($data[$key]["body"]);
		}

		$this->assign('data',$data);
		$this->assign('page',$page->show()); 
		$this->display();
	}
}






?>